﻿

namespace XFramework
{

    public class FsmBase
    {
        /// <summary>
        /// 状态的ID 用来标识每一个状态
        /// </summary>
        public E_state e_State { get; }

        //初始化
        public FsmBase(E_state _state)
        {
            this.e_State = _state;
        }

        /// <summary>
        /// 状态进入
        /// </summary>
        /// <param name="args">任意可变参数</param>
        public virtual void OnEnter(params object[] args)
        {
        }

        /// <summary>
        /// 状态保持
        /// </summary>
        /// <param name="args">任意可变参数</param>
        public virtual void OnStay(params object[] args)
        {
        }

        /// <summary>
        /// 状态退出
        /// </summary>
        /// <param name="args">任意可变参数</param>
        public virtual void OnExit(params object[] args)
        {
        }

    }
}